<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>

<spring:message code="trip.overview_lbl" var="trips_overview"/>
<spring:message code="trip.id_lbl" var="trip_id"/>
<spring:message code="trip.start_date_lbl" var="start_date"/>
<spring:message code="trip.end_date_lbl" var="end_date"/>
<spring:message code="trip.status_lbl" var="status"/>
<spring:message code="trip.min_persons_lbl" var="min_persons"/>
<spring:message code="trip.max_persons_lbl" var="max_persons"/>
<spring:message code="trip.number_of_nights_lbl" var="number_of_nights"/>
<spring:message code="trip.accommodations_lbl" var="accommodations_var"/>
<spring:message code="trip.accommodations_country_lbl" var="country_var"/>
<spring:message code="trip.accommodations_city_lbl" var="city_var"/>
<spring:message code="trip.accommodations_title_lbl" var="title_var"/>
<spring:message code="trip.accommodations_description_lbl" var="description_var"/>
<spring:message code="trip.accommodations_housings_lbl" var="housing_var"/>
<spring:message code="trip.accommodations_housings_title_lbl" var="housing_title_var"/>
<spring:message code="trip.accommodations_housings_description_lbl" var="housing_description_var"/>
<spring:message code="trip.accommodations_housings_minpersons_lbl" var="housing_minpersons_var"/>
<spring:message code="trip.accommodations_housings_maxpersons_lbl" var="housing_maxpersons_var"/>
<spring:message code="trip.accommodations_street_lbl" var="accommodation_street_var"/>
<spring:message code="trip.accommodations_housenumber_lbl" var="accommodation_housenumber_var"/>
<spring:message code="trip.accommodations_postalcode_lbl" var="accommodation_postalcode_var"/>
<spring:message code="trip.accommodation_type_lbl" var="accommodation_type"/>


<div class="panel panel-default" >
    <div class="panel-heading" >
        <h2>${trips_overview}</h2>
    </div>
    <div class="container-fluid">
        <div class="panel-body " >
            <c:forEach var="trip" items="${trips}">
                <div class="row">
                    <div class="row">
                        <label class="col-md-3 control-label">${trip_id}</label>
                        <div class="col-md-3">${trip.id}</div>
                    </div>
                    <div class="row">
                        <label class="col-md-3 control-label">${start_date}</label>
                        <div class="col-md-3">${trip.startDate}</div>
                    </div>
                    <div class="row">
                        <label class="col-md-3 control-label">${end_date}</label>
                        <div class="col-md-3">${trip.endDate}</div>
                    </div>
                    <div class="row">
                        <label class="col-md-3 control-label">${status}</label>
                        <div class="col-md-3">${trip.status}</div>
                    </div>
                    <div class="row">
                        <label class="col-md-3 control-label">${min_persons}</label>
                        <div class="col-md-3">${trip.minPersons}</div>
                    </div>
                    <div class="row">
                        <label class="col-md-3 control-label">${max_persons}</label>
                        <div class="col-md-3">${trip.maxPersons}</div>
                    </div>
                    <div class="row">
                        <label class="col-md-3 control-label">${number_of_nights}</label>
                        <div class="col-md-3">${trip.amount_nights}</div>
                    </div>

                    <div class="row"><br />
                        <h4>${accommodationsVar}</h4>
                    </div>
                    <c:forEach var="accommodation" items="${trip.accommodations}">
                        <div class="row">
                            <label class="col-md-3 control-label">${country_var}</label>
                            <div class="col-md-3">${accommodation.country.name}</div>
                        </div>
                        <div class="row">
                            <label class="col-md-3 control-label">${city_var}</label>
                            <div class="col-md-3">${accommodation.city.name}</div>
                        </div>
                        <div class="row">
                            <label class="col-md-3 control-label">${title_var}</label>
                            <div class="col-md-3">${accommodation.title}</div>
                        </div>
                        <div class="row">
                            <label class="col-md-3 control-label">${description_var}</label>
                            <div class="col-md-3">${accommodation.description}</div>
                        </div>
                        <div class="row"><br />
                            <h4>${housing_var}</h4>
                        </div>
                        <c:forEach var="housing" items="${accommodation.housings}">
                            <div class="row">
                                <label class="col-md-3 control-label">${housing_title_var}</label>
                                <div class="col-md-3">${housing.title}</div>
                            </div>
                            <div class="row">
                                <label class="col-md-3 control-label">${housing_description_var}</label>
                                <div class="col-md-3">${housing.description}</div>
                            </div>
                            <div class="row">
                                <label class="col-md-3 control-label">${housing_minpersons_var}</label>
                                <div class="col-md-3">${housing.minPersons}</div>
                            </div>
                            <div class="row">
                                <label class="col-md-3 control-label">${housing_maxpersons_var}</label>
                                <div class="col-md-3">${housing.maxPersons}</div>
                            </div>
                        </c:forEach>

                        <div class="row">
                            <label class="col-md-3 control-label">${accommodation_type}</label>
                            <div class="col-md-3">${accommodation.accommodationType.type}</div>
                        </div>
                        <div class="row">
                            <label class="col-md-3 control-label">${accommodation_street_var}</label>
                            <div class="col-md-3">${accommodation.street}</div>
                        </div>
                        <div class="row">
                            <label class="col-md-3 control-label">${accommodation_housenumber_var}</label>
                            <div class="col-md-3">${accommodation.housenumber}</div>
                        </div>
                        <div class="row">
                            <label class="col-md-3 control-label">${accommodation_postalcode_var}</label>
                            <div class="col-md-3">${accommodation.postalCode}</div>
                        </div>
                        <div>_______________________________________________________________</div>
                    </c:forEach>
                </div>
            </c:forEach>
        </div>
    </div>
</div>